using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Acms.WebControls
{
    public class IndexField : DataControlField
    {

        protected override DataControlField CreateField()
        {
            return new IndexField();
        }

        public override void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
        {
            if (cellType == DataControlCellType.DataCell)
            {
                cell.Text = (rowIndex + 1).ToString();
            }
        } 
    }
}
